<template>
	<view>
		<u-sticky :custom-nav-height="topHeight" style="background:#fff;">
			<view class="register_txt dis-flex flex-y-center" style="background: #fff;">
				<u-icon name="arrow-left" color="#252525" size="24" @click="back"></u-icon>
				<view class="u_tabs flex-box">
					<u-tabs lineColor="#252525" :activeStyle="{color:'#252525',fontWeight:'600'}" :list="tabsList"
						@click="tabClick" :current="current">
					</u-tabs>
				</view>
			</view>
		</u-sticky>
		<view class="list">
			<view v-if="current ==0">
				<HuGuan :type="type"></HuGuan>
			</view>
			<view v-if="current == 1">
				<Notice></Notice>
			</view>
			<view v-if="current == 2">
				<Fans></Fans>
			</view>
		</view>

	</view>
</template>

<script>
	import HuGuan from '@/components/interest/HuGuan.vue'
	import Notice from '@/components/interest/notice'
	import Fans from '@/components/interest/fans'
	export default {
		name: 'fans', //粉丝
		components: {
			HuGuan,
			Notice,
			Fans
		},
		data() {
			return {
				current: 0,
				tabsList: [{
					name: '互关'
				}, {
					name: '关注'
				}, {
					name: '粉丝'
				}],
				list: [],
				type:'',
				
			}
		},
		onLoad(options) {
			if (options) {
				this.current = options.type
				if(this.current == 0){
					this.type = options.message_type
				}
			}
		},
		methods: {
			tabClick(e) {
				this.current = e.index
			},
			back() {
				uni.navigateBack({
					delta: 1,
					fail(e) {
						console.log(e);
					}
				})
			},

			toJump(url) {
				if (!url) return
				uni.navigateTo({
					url
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.register_txt {
		padding: 0 24rpx;

		.imgicon {
			width: 46rpx;
		}

		/deep/.u-tabs__wrapper__nav__item {
			flex: 1;
		}
	}

	.menus {
		padding: 60rpx 100rpx 30rpx;

		.items {
			font-size: 30rpx;
			color: $uni-text-color;
			line-height: 90rpx;
		}
	}
</style>